<?php
/**
 * Created by Veyron
 * User: Vy
 * motto:现在的拼搏 为了更好的明天
 * day:  2020/1/17
 * Time: 11:33
 */

namespace app\api\controller;

use app\common\business\Goods as GoodsBis;
use app\common\business\Order;
use app\common\lib\Show;
use app\common\lib\Snowflake;

class Index extends ApiBase {
    /**
     * 首页轮播图
     * @return \think\response\Json
     */
    public function getRotationChart(){
        $result = (new GoodsBis())->getRotationChart();
        return Show::success($result);
    }
    public function cagegoryGoodsRecommend(){
        $categoryIds = [
            37,
            35
        ];
        $result = (new GoodsBis())->categoryGoodsRecommend($categoryIds);
        return Show::success($result);
    }
    public function test(){
//        $node_id = rand(1, 1023);//随机数
//        $id = Snowflake::getInstance()->setWorkId($node_id)->id();
//        echo $id;
        (new Order())->checkOrderStatus();

    }

}
